package com.xyh;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.client.RestTemplate;

@RestController
public class TestController {
    @Autowired
    private MemberClient memberClient;
    @RequestMapping(value = "/food-sale/{memberId}",method = RequestMethod.GET)
        public String foodSale(@PathVariable Integer memberId){
        Member m=memberClient.getMember(memberId);
        System.out.println(m.getId()+"---"+m.getName());
        return "success";
        }
}
